import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.Ignore;

public class Liczba2Test2 {
	
	private Liczba2 number1 = null;
	private Liczba2 number2 = null;

	@Before
	public void setUp() throws Liczba2Exception {
		number1 = new Liczba2();
		number2 = new Liczba2();
	}

	@After
	public void tearDown() throws Liczba2Exception {
		number1 = null;
		number2 = null;
	}

	@Ignore
	@Test
	public void testIgnore() throws Liczba2Exception 
	{
		String number4 = number1.konwersja(5555,2);
		assertEquals(number4,"456");
	}
	
	@Test(timeout = 500)
	public void testKonwersjaTimeout() throws Liczba2Exception
	{
		String number3 = number2.konwersja(5533, 2);
		assertNotNull(number3);
	}
	
	@Test(expected = Liczba2Exception.class)
	public void testKonwersjaException() throws Liczba2Exception
	{
		number1.konwersja(-444,5);
	}
}